<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>错误信息</title>
    <style>
        body {
            font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
            background-color: #f5f5f5;
            margin: 0;
            padding: 0;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
        }
        .error-container {
            background-color: white;
            border-radius: 8px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            padding: 30px;
            text-align: center;
            max-width: 80%;
            width: 400px;
        }
        .error-icon {
            font-size: 60px;
            color: #ff4d4f;
            margin-bottom: 20px;
        }
        .error-title {
            font-size: 24px;
            color: #333;
            margin-bottom: 15px;
        }
        .error-message {
            font-size: 16px;
            color: #666;
            margin-bottom: 30px;
            word-break: break-word;
        }
        .back-button {
            background-color: #1890ff;
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 4px;
            font-size: 16px;
            cursor: pointer;
            transition: background-color 0.3s;
        }
        .back-button:hover {
            background-color: #40a9ff;
        }
    </style>
</head>
<body>
    <div class="error-container">
        <div class="error-icon">!</div>
        <h1 class="error-title">出错了</h1>
        <div id="errorMessage" class="error-message">加载错误信息中...</div>
        <button class="back-button" onclick="goBack()">返回上一页</button>
    </div>

    <script>
        // 页面加载时从URL参数获取错误信息
        document.addEventListener('DOMContentLoaded', function() {
            // 获取URL参数
            const urlParams = new URLSearchParams(window.location.search);
            const errorMsg = urlParams.get('error');
            
            // 显示错误信息，如果没有则显示默认信息
            const errorMessageElement = document.getElementById('errorMessage');
            if (errorMsg) {
                // 解码URL编码的错误信息
                errorMessageElement.textContent = decodeURIComponent(errorMsg);
            } else {
                errorMessageElement.textContent = '未知错误';
            }
        });

        // 返回上一页函数
        function goBack() {
            window.history.back();
        }
    </script>
</body>
</html>